#!/bin/bash
# author: hsowan<hsowan.v@gmail.com>

install() {
    mv /etc/apt/sources.list /etc/apt/sources.list.bak
    wget -O /etc/apt/sources.list https://gitee.com/hsowan/ausi/raw/master/$1/sources.list
    apt update
    apt upgrade
}

if [[ $# -ne 1 ]]; then
    echo 'Expect a param.'
elif [[ $1 == 'xenial' ]]; then
    install $1
elif [[ $1 == 'bionic' ]]; then
    install $1
else
    echo 'Only support xenial(16) and bionic(18)'
fi

